<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/report/";  //应用的地址名
String listActionName = basePath+"taxIllegalSource.action?op=searchjs";
String lookActionName = basePath+"taxIllegalSource.action?op=look";
String editActionName = basePath+"taxIllegalSource_modify.action";
String delActionName = basePath+"taxIllegalSource_del.action?op=deljs";
String dealActionName=basePath+"taxIllegalSource_dealPage.action";
String excelActionName=basePath+"taxIllegalSource_saExcel.action";
%>
<script language="javascript" src="<%=path %>/js/My97/WdatePicker.js"></script>
<script language="javascript" src="<%=path %>/jslib/orgSelect.js"></script>
<script type="text/javascript">
    		$(function(){
    			$('#regDept').combotree({
    			    url:'<%=path%>/util/util_searchOrgJsonTree.action?viewType=self&',
    			    params:{},
    			    valueField:'id',
    		        textField:'text',
    		        panelWidth:200,
    		        checkbox:false
    		        });
    			$('#inspectDept').orgSelect({
    				inspectDeptId:'inspectDept',
    		        collectDeptId:'collectDept'
    			});	
			//表格初始化
			$('#searchTable').grid({
				title:[<ce:menu/>],
				url:'<%=listActionName%>',
				queryParams:{
					'search.regNumber':'',
					'search.repDept':'',
					'search.repType':'',
					'search.beginRepDate':'',
					'search.endRepDate':'',
					'search.repPerson':'',
					'search.repPersonPhone':'',
					'search._dealWay':'',
					'search.beginCloseDate':'',
					'search.endCloseDate':'',
					'search.regDept':'',
					'search.inspectDept':'',
					'search.collectDept':'',
					'search.caseOf':'1'
					},  //用于查询的参数以及初始值
				//表头列，不建议改动
				frozenColumns:[[   
	                {field:'ck',checkbox:true},
	                {field:'reportTime',title:'检举日期',width:80,sortable:true},		
                    {field:'taxpayerNumber',title:'纳税人识别号',width:120,sortable:true},
                    {field:'taxEnterprice',title:'企业名称',width:160,sortable:true},
                    {
          				field : 'state',
        				title : '状态',		
        				width : 100,
        				sortable : true,
        				formatter : function(value,row) {
        					var statu=row.status;
        					var statuInfo='';
        					if(0==statu){
        						statuInfo="待签收";
        					}else if(1==statu){
        						statuInfo="已签收";
        					}
        					if (value == '1') {
        						return "选案 "+statuInfo;
        					} else if (value == '2') {
        						return "检查 "+statuInfo;
        					} else if (value == '3') {
        						return "审理 "+statuInfo;
        					} else if (value == '4') {
        						return "执行 "+statuInfo;
        					} else if (value == '9') {
        						return "结案";
        					} else if (value == '-2') {
        						return "暂存待查";
        					}else if(value == ''){
        						return "未下达";
        					}
        				}
        			}
				]],
				//数据列，根据显示的内容进行修改
				columns:[[   
                        {field:'prosecutedPersonAddr',title:'被检举人地址',width:200},
                        {field:'reportTypeName',title:'检举形式',width:120,sortable:true},
                        {field:'reportFromName',title:'检举来源',width:120,sortable:true},
                        {field:'registerDept',title:'登记部门',width:180,sortable:true},
                        {field:'replyWay',title:'回复情况',width:240,
                            formatter:function(value){
              					if(value=='0'){
              					  return "未回复";
              					}else if(value=='1'){
              						return "已回复";
              					}else if(value=='2'){
              						return "未要求回复";
              					}else{
              						return "";
              					}
              				}
                          },
                          {field:'rewardResult',title:'奖励情况',width:240}
                      
				]],
				//功能按钮组
                toolbar:[<ce:jsonBtn/>]
			});
			//查询操作
			$('#search').click(function(){
                defaultSearchAction();
            });
			$('#resetSearch').click(function(){
				$('#regNumber').val("");
			    $('#repDept').combotree('setValue','');
			    $('#repType').val("");
			    $('#beginRepDate').val("");
			    $('#endRepDate').val("");
			    $('#repPerson').val("");
			    $('#repPersonPhone').val("");
			    $('#_dealWay').val("");
			    $('#beginCloseDate').val("");
			    $('#endCloseDate').val("");
			    $('#regDept').val("");
			});
		});	
		
   		//打开查看页面
   		function viewItem(id){
   			var rows = $('#searchTable').datagrid('getSelections');	
   			var id=rows[0].vcId;
   			defaultOpenWindow('<%=lookActionName%>&chkSelf='+id,'举报信息查看',600,600)
   		}
		//点击编辑按钮后的操作：打开编辑界面
		function openModifyPage(){
		    //默认的打开编辑界面操作（编辑页面地址，窗口宽度，窗口高度）
            defaultOpenModifyPageHavebtn('<%=editActionName%>',700,550);
		}
		//删除数据操作
		function deleteItems(){
            defaultDeleteItems('<%=delActionName%>');
		}
		
        function dealItem(){
        	defaultOpenDealPageHavebtn('<%=dealActionName%>',580,400,null,'处理情况登记');
        }
        function downItem (){
        	
        }
        function saveAsExcel(){
     	   if($('#saveExcelFrm').length==0){
     			$('<iframe id="saveExcelFrm" name="saveExcelFrm" width=0 height=0></iframe>').appendTo(document.body);
     		}
     		var f = $('form:first');
     		var fa = f.attr('action');
     		f.attr('target','saveExcelFrm');
     		f.attr('action','<%=excelActionName%>');
     		f[0].submit();
     		f.attr('target','');
     		f.attr('action',fa);
         }  
</script>
<html>
 <head>
 <title></title>
 </head> 
<body class="easyui-layout">
<form id="excelSearch">
<div class="div_height_auto" data-options="region:'north',border:false" style="overflow: hidden;" align="left">
<table>
<tr height="30px;">
	<td align="right">纳税人识别号：</td><td><input type="text" name="search.regNumber" id="regNumber" style="width:100px;"/></td>
	<td align="right">企业名称：</td><td><input type="text" name="search.repDept" id="repDept"  style="width:100px;"/></td>
	<td align="right">举报形式：</td><td><ce:dictSelect name="search.repType" id="repType"  dictName="检举台账管理-检查形式" allOption="true" style="width:100px;"/></td>
	<td align="right">举报日期：</td>
	<td><input type="text" name="search.beginRepDate" id="beginRepDate" style="width:80px;" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>&nbsp;至&nbsp;
	    <input type="text" name="search.endRepDate" id="endRepDate"  style="width:80px;"  class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>
	</td>
	<td rowspan="3" valign="center">
	   <a id="search" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-search">查询</a>
	   <a id="resetSearch" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-redo">重置</a>
	</td>
</tr>
<tr height="30px;">
	<td align="right">检举人：</td><td><input type="text" name="search.repPerson" id="repPerson" style="width:100px;"/></td>
	<td align="right">检举人电话：</td><td><input type="text" name="search.repPersonPhone" id="repPersonPhone"  style="width:100px;"/></td>
	<td align="right">处理方式：</td>
	<td> 
	   <select id="_dealWay" name="search._dealWay" style="width:100px;">
	     <option value="">-全部-</option>
	     <option value="1">快速处理</option>
	     <option value="2">移交市局</option>
	     <option value="3">转交其他部门</option>
	   </select>
	</td>
	<!-- 2015-06-09 by 修改，开始 -->
	<!-- 屏蔽搜索条件：结案日期，并调整表格 -->
	<td align="right">受理单位：</td><td><input type="text" name="search.regDept" id="regDept" style="width:100px;"/></td>
	<!-- 
	<td align="right">结案日期：</td>
	<td>
	    <input type="text" name="search.beginCloseDate" id="beginCloseDate" style="width:80px;" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>&nbsp;至&nbsp;
	    <input type="text" name="search.endCloseDate" id="endCloseDate" style="width:80px;" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>
	    
	</td>
	 -->
	<!-- 2015-06-09 by 修改，结束 -->
</tr>
<tr height="30px;">
	<td align="right">所属稽查局：</td><td><select type="text" name="search.inspectDept" id="inspectDept" style="width:100px;"></select></td>
	<td align="right">所属征管局：</td><td><select type="text" name="search.collectDept" id="collectDept" style="width:100px;"></select></td>
	<td colspan="3"></td>
	
</tr>
</table>
</div>
<div data-options="region:'center',border:false" style="overflow: hidden;">
  <table id="searchTable"></table>
</div>
</form>
</body>
</html>
   
   

